"""
@Description : Flask初始化
@File        : application.py
@Project     : EasyMath
@Time        : 2020/9/2 上午11:15
@Author      : Dexter Lien
@Software    : PyCharm
"""
from flask import Flask
from server.views import home_bp


def create_app(name):
    """
    生成Flask实例
    :param name:
    :return:
    """
    app = Flask(name)
    app.config.from_object('server.common.config')
    app.register_blueprint(home_bp)
    return app
